import request from '/@/utils/request';

/**
 * 车队管理相关接口
 */

// 分页查询车队
export function getFleetPage(params) {
	return request({
		url: '/platform/tTruckFleet/page',
		method: 'get',
		params,
	});
}

// 查询车队列表
export function getFleetList(params) {
	return request({
		url: '/platform/tTruckFleet/list',
		method: 'get',
		params,
	});
}

// 新增车队信息
export function addFleet(data) {
	return request({
		url: '/platform/tTruckFleet/save',
		method: 'post',
		data,
	});
}

// 修改车队信息
export function updateFleet(data) {
	return request({
		url: '/platform/tTruckFleet/updateById',
		method: 'put',
		data,
	});
}

// 通过id启用/禁用车队信息
export function toggleFleetStatus(data) {
	return request({
		url: `/platform/tTruckFleet/enableOrDisable`,
		method: 'put',
		data,
	});
}
